﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InterfazOperacion;
using DivisionException;

namespace PluginDivision
{
    public class Division : Operacion
    {
        public Division() { }

        public double operar(double op1, double op2)
        {
            double toReturn = 0;

            if (op2 != 0)
                toReturn = op1 / op2;
            else
                throw new DivisionPorCeroException("No se puede dividir por cero!");

            return toReturn;
        }

        public char getSimbolo()
        {
            return '/';
        }
    }
}
